import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * @Author czx
 * @Date 2025/3/17
 * @Time 15:22
 */
public class TestSystem {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);

        //初始化
        List<MeetingRoom>meetingRooms=new ArrayList<>();
        meetingRooms.add(new MeetingRoom("会议室A-101",20,true));
        meetingRooms.add(new MeetingRoom("会议室A-201",20,true));
        meetingRooms.add(new MeetingRoom("会议室B-301",20,true));
        meetingRooms.add(new MeetingRoom("会议室C-401",20,false));
        meetingRooms.add(new MeetingRoom("会议室D-501",20,false));

        Reservationsystem reservationsystem=new Reservationsystem(meetingRooms);

        System.out.println("---欢迎使用会议管理系统---");
        System.out.println("1. 查看所有会议室");
        System.out.println("2. 预定会议室");
        System.out.println("3. 查看预定信息");
        System.out.println("4. 查看指定时间可用的会议室");
        System.out.println("5. 退出系统");
        while(true){
            System.out.print("请选择操作:");
            int option=sc.nextInt();
            switch(option){
                case 1:
                    reservationsystem.showAllMeetingRooms();
                    break;
                case 2:
                    reservationsystem.reserveMeetingRoom();
                    break;
                case 3:
                    reservationsystem.showResInfo();
                    break;
                case 4:
                    reservationsystem.selectRoomByTime();
                    break;
                case 5:
                    System.exit(0);

            }
        }
    }
}
